package com.example.compreshensiveshop.service;

import com.example.compreshensiveshop.dto.*;
import com.example.compreshensiveshop.po.ProductPO;
import com.example.compreshensiveshop.vo.PageResultVO;
import com.example.compreshensiveshop.vo.ProductMessageVO;
import com.example.compreshensiveshop.vo.ProductVO;
import com.example.compreshensiveshop.vo.SkuListVO;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * Product Service Interface
 */
public interface ProductService {

    void addProductSku(SkuCreateDTO skuCreateDTO);

    List<SkuListVO> queryByPId(Long productId);

    void updateProductSku(SkuUpdateDTO skuUpdateDTO);

    void lockStock(Long skuId, Integer quantity);

    void backStock(Long skuId, Integer quantity);
    void releaseStock(Long skuId, Integer quantity);

    ProductMessageVO queryMessageById(Long id);

    String queryProductMainImage(Long skuId);

    String queryProductSkuName(Long skuId);

    PageResultVO<ProductVO> queryProductsByCondition(ProductQueryDTO queryDTO);

    Long addProduct(ProductCreateDTO productCreateDTO);

    void updateProduct(ProductUpdateDTO productUpdateDTO);

    // 增加商品浏览量
    void incrementViewCount(Long productId);

    void updateStatus(Long id, Integer status);

    void deleteImages(Long id);
    List<ProductPO> getProductByKeyword(String keyword);

    List<ProductPO> getProductByCategory(String category);
}